//
//  PHDeviceAddViewController.m
//  PhnixHome
//
//  Created by Levy Xu on 2017/11/24.
//  Copyright © 2017年 Levy Xu. All rights reserved.
//

#import "PHDeviceAddViewController.h"
#import "PHQRCodeViewController.h"
#import "PHAddUtils.h"
#import "PHWiFiViewController.h"

@interface PHDeviceAddViewController ()

@end

@implementation PHDeviceAddViewController

- (void)initDataSource {
    self.dataSource = [GPHAddUtils deviceArray];
}

- (void)didSelectCellWithIndex:(NSInteger)index {
    GPHAddUtils.selectedIndex = index;
    
    if (index == 0) {
        PHQRCodeViewController *qrVC = [[PHQRCodeViewController alloc] init];
        [self.navigationController pushViewController:qrVC animated:YES];
    } else if (index == 2 || index == 3) {
        PHWiFiViewController *wpVC = [[PHWiFiViewController alloc] init];
        [self.navigationController pushViewController:wpVC animated:YES];
    } else {
        [KKHUD showInfo:@"即将上线，敬请期待"];
    }
}

- (void)setupNavigationItems {
    self.title = NSLocalizedString(@"title_add_dev", nil);
    
    [super setupNavigationItems];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

@end
